package com.mls.fivedistrict.server.impl;

import com.baomidou.mybatisplus.mapper.Condition;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.mls.fivedistrict.pojo.UserAuthRewardRecord;
import com.mls.fivedistrict.dao.UserAuthRewardRecordMapper;
import com.mls.fivedistrict.server.UserAuthRewardRecordService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户认证奖励记录表 服务实现类
 * </p>
 *
 * @author Five Team
 * @since 2018-05-23
 */
@Service
public class UserAuthRewardRecordServiceImpl extends ServiceImpl<UserAuthRewardRecordMapper, UserAuthRewardRecord> implements UserAuthRewardRecordService {

    @Autowired
    UserAuthRewardRecordMapper userAuthRewardRecordMapper;

    @Override
    public List<UserAuthRewardRecord> getUserAuthRewardRecordByUserAuthId(Long userAuthId) {
        Wrapper wrapper = Condition.create().eq("user_auth_id", userAuthId).eq("is_delete", false);
        List list = userAuthRewardRecordMapper.selectList(wrapper);
        return list;
    }
}
